<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Messages.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Messages.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '短信模板',
                    name: 'Messages',
                    url: "/Messages/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"templateType":"","spare15":"","templateCode":"","templateName":"","auditreason":"","templateContent":"","remark":"","creator":"","createDate":"","modifier":"","modifyDate":""},
                editFormOptions: [[{"dataKey":"MessageType","data":[],"title":"短信类型","field":"templateType","colSize":12,"type":"select","required":true,}],
                              [{"dataKey":"MessageTemplate","data":[],"title":"常用模板","field":"spare15","colSize":12,"type":"select"}],
                              [{"title":"模板名称","required":true,"field":"templateName","colSize":12,"type":"text"}],
                              [{"title":"模板内容","required":true,"field":"templateContent","colSize":12,"type":"textarea"}],
                              [{"title":"备注","field":"remark","required":true,"colSize":12,"type":"textarea"}],
                              [{"title":"失败原因","field":"auditreason","required":true,"colSize":12,"type":"textarea","disabled":true,"hidden":true,}],
                              [{"title":"创建人","field":"creator","disabled":true,"type":"text"},
                               {"title":"创建时间","field":"createDate","disabled":true,"type":"datetime"}],
                              [{"title":"修改人","field":"modifier","disabled":true,"type":"text"},
                               {"title":"修改时间","field":"modifyDate","disabled":true,"type":"datetime"}]],
                 searchFormFields: {"templateType":"","templateName":""},
                searchFormOptions: [[{"title":"模板名称","field":"templateName","type":"like"},{"dataKey":"MessageType","data":[],"title":"短信类型","field":"templateType","type":"select",}]],
                columns: [{field:'auditStatus',title:'审核状态',type:'int',width:120,align:'left',bind:{ key:'audit',data:[]},},
                       {field:'templateType',title:'短信类型',type:'string',bind:{ key:'MessageType',data:[]},width:100,align:'left',sortable:true},
                       {field:'templateCode',title:'模板代码',type:'string',width:180,align:'left'},
                       {field:'templateName',title:'模板名称',type:'string',width:150,align:'left'},
                       {field:'templateContent',title:'模板内容',type:'string',width:750,align:'left'},
                       {field:'remark',title:'备注',type:'string',width:500,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:120,readonly:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:220,readonly:true,align:'left',sortable:true},
                       {field:'modifier',title:'修改人',type:'string',width:120,readonly:true,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:220,readonly:true,align:'left',sortable:true},
                       {field:'spare9',title:'扩展字段1',type:'string',width:120,hidden:true,align:'left'},
                       {field:'spare8',title:'扩展字段1',type:'string',width:120,hidden:true,align:'left'},
                       {field:'spare15',title:'扩展字段1',type:'string',bind:{ key:'MessageTemplate',data:[]},width:120,hidden:true,align:'left'},
                       {field:'spare14',title:'扩展字段1',type:'string',width:120,hidden:true,align:'left'},
                       {field:'spare13',title:'扩展字段1',type:'string',width:120,hidden:true,align:'left'},
                       {field:'spare11',title:'扩展字段1',type:'string',width:120,hidden:true,align:'left'},
                       {field:'spare10',title:'扩展字段1',type:'string',width:120,hidden:true,align:'left'},
                       {field:'modifyID',title:'修改人ID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'isDelete',title:'是否删除',type:'int',width:120,hidden:true,hidden:true,align:'left'},
                       {field:'isAvailable',title:'是否可用',type:'sbyte',width:120,hidden:true,align:'left'},
                       {field:'id',title:'短信主键',type:'int',width:120,hidden:true,readonly:true,hidden:true,align:'left'},
                       {field:'createID',title:'创建人ID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'spare12',title:'扩展字段1',type:'string',width:120,hidden:true,align:'left'},
                       {field:'auditDate',title:'审核日期',type:'datetime',width:120,hidden:true,align:'left',sortable:true},
                       {field:'auditStatus',title:'审核状态',type:'int',width:120,align:'left',bind:{ key:'audit',data:[]},},
                       {field:'auditId',title:'审核员',type:'int',width:120,hidden:true,align:'left'},
                       {field:'auditor',title:'审核员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'auditreason',title:'审核原因',type:'string',width:750,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
